The Active Data Driver (P2SMON.DLL) is a standard dynamic link library that is normally used by Crystal Reports (or the Report Designer Component) to access ActiveX data sources such as DAO and ADO. The DLL is installed, by default, in your \WINDOWS\SYSTEM directory. In addition, the Active Data Driver exports functions that can be used at runtime from within your application to dynamically design a data definition file based on your data source, and a report file based on the data definition file. These functions are available to any development environment that supports DLL function calls.
Note: To use the functions in the Active Data Driver DLL, you must declare the functions first. Refer to your Visual Basic documentation for information on declaring DLL functions. See The Crystal Active Data Driver Reference for information about declaring the Active Data Driver functions.
CreateReportOnRuntimeDS(daoRs, "c:\reports\orders.rpt",
"c:\reports\orders.ttx", True, False)
This example creates a data definition file named ORDERS.TTX, then creates a simple report file based on this data definition file and names it ORDERS.RPT. If the last argument is set to True, Crystal Reports, if installed on the system, will open automatically on the user's machine, allowing them to make changes to the report file.
Notice that the first argument is a DAO Recordset object. If you are using this function in a language such as C or C++, you would pass a pointer to an IUnknown derived interface to the Recordset.
Note: See The Crystal Active Data Driver Reference for complete information on the functions provided by the Active Data Driver.
Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |